import requests
import json


payload_match = {
    'term': '大码 女装 蕾丝 连衣裙',
    # 'term': 'demo',
    'from': 0,
    'size': 10,
    'highlight': True,
    'order_by': 'influence',
    'min_relative': 0.3,
    # 'max_relative': 0.2,
    'min_influence': 200.0,
    'max_influence': 700.0,
    'filters': {

    }
}

r_match = requests.post('http://localhost:5000/search/v1.1/wechat', json=payload_match, timeout=200)
a_match = r_match.json()
print("2\n")
print(json.dumps(a_match, indent=4, sort_keys=True, ensure_ascii=False))


# payload_match = {
#     'biz_code': 'rmrbwx',
# }
#
# r_match = requests.post('http://localhost:5000/search/v1.1/wechat/infos', json=payload_match, timeout=200)
# a_match = r_match.json()
# print("2\n")
# print(json.dumps(a_match, indent=4, sort_keys=True, ensure_ascii=False))
#



# payload_match = {
#     'biz_code': 'rmrbwx',
# }
#
# r_match = requests.post('http://localhost:5000/search/v1.1/wechat/content_type_tags', json=payload_match, timeout=200)
# a_match = r_match.json()
# print("2\n")
# print(json.dumps(a_match, indent=4, sort_keys=True, ensure_ascii=False))


# payload_match = {
#     'term': '大码 女装 蕾丝 连衣裙',
#     'biz_code': 'rmrbwx',
#     'term': 'demo',
    # 'from': 0,
    # 'size': 10,
    # 'highlight': True,
    # 'order_by': 'overall',
    # 'min_relative': 0.3,
    # 'max_relative': 0.2,
    # 'min_influence': 200.0,
    # 'max_influence': 700.0,
    # 'filters': {
    #
    # }
# }
#
# r_match = requests.post('http://localhost:5000/search/v1.1/wechat/articles', json=payload_match, timeout=200)
# a_match = r_match.json()
# print("2\n")
# print(json.dumps(a_match, indent=4, sort_keys=True, ensure_ascii=False))
#



# payload_overview = {
#     'biz_code': 'rmrbwx',
#     'from': '2016-05-01 00:00:00',
#     'to': '2016-05-30 00:00:00',
# }
#
# r_overview = requests.post('http://localhost:5000/search/v1.1/wechat/summary', json=payload_overview, timeout=200)
# a_overview = r_overview.json()
# print("2\n")
# print(json.dumps(a_overview, indent=4, sort_keys=True, ensure_ascii=False))



